import request from '@/utils/request'

// 查询优选列表
export function findPreferenceList(data) {
  return request({
    url: '/marketing/preference/findList',
    method: 'post',
    data
  })
}

// 根据编号查询优选
export function findByPreferenceId(preferenceId) {
  return request({
    url: '/marketing/preference/findById/'+preferenceId,
    method: 'get'
  })
}
// 查询所有推荐优选
export function findPreferenceListAll() {
  return request({
    url: '/marketing/preference/findAll',
    method: 'get'
  })
}



// 新增优选
export function addPreference(data) {
  return request({
    url: '/marketing/preference/add',
    method: 'post',
    data: data
  })
}

// 修改优选
export function updatePreference(data) {
  return request({
    url: '/marketing/preference/update',
    method: 'put',
    data: data
  })
}
// 删除优选
export function deletePreference(preferenceId) {
  return request({
    url: '/marketing/preference/delete/' + preferenceId,
    method: 'delete'
  })
}
